﻿<%@ Page Title="" Language="C#" MasterPageFile="~/pages/Main.Master" AutoEventWireup="true"
	CodeBehind="Questions.aspx.cs" Inherits="qna.pages.Questions" %>

<%@ Reference Control="~/Controls/QuestionControl.ascx" %>
<%@ Register Src="../Controls/QuestionForm.ascx" TagName="QuestionForm" TagPrefix="uc1" %>
<asp:Content ID="Head" ContentPlaceHolderID="Head" runat="server">
	<script type="text/javascript" src="../js/mustache.min.js"></script>
	<script type="text/javascript" src="../js/pagination.js"></script>
	<script type="text/javascript" src="../js/question.js"></script>
	<script type="text/template" id="question-template">
    <div id="QA">
	    <div id="ud">
		    <input type="hidden" value="{{id}}" />
		    <input type="image" ID="subscribeBtn" src="../images/subscribe_grayscale.jpg"
			    onmouseover="this.src='../images/subscribe.jpg'" 
			    onmouseout="this.src='../images/subscribe_grayscale.jpg'" />
		    {{#haveEditBtn}}
		    <a href="/pages/EditQuestion.aspx?id={{id}}" ID="editLink">
			    <input type="image" ID="editBtn" src="../images/edit_grayscale.jpg"
				    onmouseover="this.src='../images/edit.jpg'" onmouseout="this.src='../images/edit_grayscale.jpg'" />
		    </a>
            {{/haveEditBtn}}
		    {{#haveDeleteBtn}}
		    <input type="image" ID="deleteBtn" src="../images/delete_grayscale.jpg" onmouseover="this.src='../images/delete.jpg'"
			    onmouseout="this.src='../images/delete_grayscale.jpg'" />
		    {{/haveDeleteBtn}}
	    </div>
	    <br /><br />
	    <h2>{{title}}</h2>
	    <p class="date">{{date}}</p>
	    <p class="descrip">{{content}}</p>
	    <div id="btmLine">
		    <ul>
			    <li class="imgRating">
				    <input type="image" ID="imgRating" src="../images/images.jpg" onmouseover="this.src='../images/rating_liked.jpg'"
					    onmouseout="this.src='../images/images.jpg'" />
			    </li>
			    <li class="lblRating">
				    <label ID="rating">{{rating}}</label>
			    </li>
			    <li class="Answer">
				    <a href="/pages/AnswerQnA.aspx?view={{id}}">Answers ({{answers}})</a>
			    </li>
			    <li class="uname">Posted By:
				    <label ID="postedBy">{{user}}</label>
			    </li>
		    </ul>
	    </div>
    </div>
	</script>
</asp:Content>
<asp:Content ID="MainColumn" ContentPlaceHolderID="MainColumn" runat="server">
	<h1 class="h1">
		Ask a Question:</h1>
    <asp:HiddenField ID="userId" runat="server" />
	<uc1:QuestionForm ID="questionForm" runat="server" />
	<asp:Panel ID="QuestionList" runat="server">
		<div id="QSort">
			<p class="sortLink">
				<asp:HyperLink ID="PopLink" runat="server" ForeColor="#E44D32" NavigateUrl="~/pages/Questions.aspx?rating=5">POPULAR</asp:HyperLink></p>
		</div>
		<div id="QSort1">
			<p class="sortLink">
				<asp:HyperLink ID="RecentLink" runat="server" ForeColor="#E44D32" NavigateUrl="~/pages/Questions.aspx">RECENT</asp:HyperLink></p>
		</div>
	</asp:Panel>
</asp:Content>
